%macro sortds(ds=,outds=,keyvar=);

proc sort data=&ds out=&outds;
  by &keyvar;
run;

%mend;
